package com.brainhealth.customer.service.impl;

import java.util.List;
import com.brainhealth.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.brainhealth.customer.mapper.RoomChatTokensMapper;
import com.brainhealth.customer.domain.RoomChatTokens;
import com.brainhealth.customer.service.IRoomChatTokensService;

/**
 * 私人空间AI聊天字数Service业务层处理
 * 
 * @author ruoyi
 * @date 2023-11-01
 */
@Service
public class RoomChatTokensServiceImpl implements IRoomChatTokensService 
{
    @Autowired
    private RoomChatTokensMapper roomChatTokensMapper;

    /**
     * 查询私人空间AI聊天字数
     * 
     * @param id 私人空间AI聊天字数主键
     * @return 私人空间AI聊天字数
     */
    @Override
    public RoomChatTokens selectRoomChatTokensById(Long id)
    {
        return roomChatTokensMapper.selectRoomChatTokensById(id);
    }

    /**
     * 查询私人空间AI聊天字数列表
     * 
     * @param roomChatTokens 私人空间AI聊天字数
     * @return 私人空间AI聊天字数
     */
    @Override
    public List<RoomChatTokens> selectRoomChatTokensList(RoomChatTokens roomChatTokens)
    {
        return roomChatTokensMapper.selectRoomChatTokensList(roomChatTokens);
    }

    /**
     * 新增私人空间AI聊天字数
     * 
     * @param roomChatTokens 私人空间AI聊天字数
     * @return 结果
     */
    @Override
    public int insertRoomChatTokens(RoomChatTokens roomChatTokens)
    {
        roomChatTokens.setCreateTime(DateUtils.getNowDate());
        return roomChatTokensMapper.insertRoomChatTokens(roomChatTokens);
    }

    /**
     * 修改私人空间AI聊天字数
     * 
     * @param roomChatTokens 私人空间AI聊天字数
     * @return 结果
     */
    @Override
    public int updateRoomChatTokens(RoomChatTokens roomChatTokens)
    {
        roomChatTokens.setUpdateTime(DateUtils.getNowDate());
        return roomChatTokensMapper.updateRoomChatTokens(roomChatTokens);
    }

    /**
     * 批量删除私人空间AI聊天字数
     * 
     * @param ids 需要删除的私人空间AI聊天字数主键
     * @return 结果
     */
    @Override
    public int deleteRoomChatTokensByIds(Long[] ids)
    {
        return roomChatTokensMapper.deleteRoomChatTokensByIds(ids);
    }

    /**
     * 删除私人空间AI聊天字数信息
     * 
     * @param id 私人空间AI聊天字数主键
     * @return 结果
     */
    @Override
    public int deleteRoomChatTokensById(Long id)
    {
        return roomChatTokensMapper.deleteRoomChatTokensById(id);
    }
}
